<!--商户详细信息-->
<div class="search">
  <!-- <nz-select style="width:100px;" [(ngModel)]="iscontact" nzAllowClear nzPlaceHolder="联系状态" (ngModelChange)="searchData()">
    <nz-option *ngFor="let item of statuslist" [nzValue]="item.key" [nzLabel]="item.value"></nz-option>
  </nz-select>
  申请日期:
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="sdate" nzPlaceHolder="开始日期">
  </nz-date-picker>
  ~
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="edate" nzPlaceHolder="结束日期">
  </nz-date-picker>
  <a (click)="searchData()">查询</a> -->
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading"
  [nzTotal]="total" [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize"
  (nzPageIndexChange)="searchData()" (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1080px',y: '400px' }">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="100px">商户名称</th>
      <th nzWidth="60px">菜系</th>
      <th nzWidth="200px">地址</th>
      <th nzWidth="100px">剩余库存</th>
      <th nzWidth="80px">餐币余额</th>
      <th nzWidth="80px">佣金比例</th>
      <th nzWidth="100px">入驻日期</th>
      <th nzWidth="80px">餐厅账户余额</th>
      <th nzWidth="80px">招募账户余额</th>
      <th nzWidth="140px" nzRight="0px">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.name}}</td>
      <td>{{data.cuisine}}</td>
      <td>{{data.address}}</td>
      <td>{{data.coinbalance}}</td>
      <td>{{data.mealbalance}}</td>
      <td>{{data.rate}}</td>
      <td>{{data.applytime | date:"yyyy-MM-dd HH:mm"}}</td>
      <td>{{data.balance}}</td>
      <td>{{data.balanceviter}}</td>
      <td nzRight="0px">

        <!-- <a *ngIf="data.iscontact=='未联系'" (click)="markcontact(data._id)">标记已联系</a> -->

        <!-- <a (click)="updatepwd(data._id)">修改密码</a> -->
        <a (click)="crsh(data._id)">申请提现</a>

        <!-- <a (click)="edit(data._id)">编辑信息</a> -->

        <!-- <a (click)="settlerecords(data._id)">结算记录</a>

        <a (click)="inv(data.legaluserid)">邀请记录</a> -->

      </td>
    </tr>
  </tbody>
</nz-table>

<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>

<nz-modal [(nzVisible)]="isVisible" nzTitle="申请提现" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"
  nzWrapClassName="vertical-center-modal" [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
    <nz-input-group nzAddOnBefore="账户类型">
      <nz-select style="width:100px;" [(ngModel)]="doc.type" (ngModelChange)="change()">
        <nz-option *ngFor="let item of typelist" [nzValue]="item.key" [nzLabel]="item.value"></nz-option>
      </nz-select>
    </nz-input-group>
    <nz-input-group nzAddOnBefore="账户余额">
      <input type="text" disabled="true" nz-input [(ngModel)]="doc.money">
    </nz-input-group>
    <nz-input-group nzAddOnBefore="提现金额">
      <input type="text" nz-input [(ngModel)]="cashmoney">
    </nz-input-group>

    <nz-input-group nzAddOnBefore="收款账户">
      <nz-select style="width:100px;" [(ngModel)]="sktype">
        <nz-option  *ngFor="let item of sktypelist" [nzValue]="item.value" [nzLabel]="item.key"></nz-option>
      </nz-select>
    </nz-input-group>

    <nz-input-group *ngIf="sktype=='bank'" nzAddOnBefore="开户行">
      <input type="text"  disabled="true" nz-input [(ngModel)]="doc.Bank">
    </nz-input-group>

    <nz-input-group *ngIf="sktype=='bank'" nzAddOnBefore="银行卡号">
      <input type="text"  disabled="true" nz-input [(ngModel)]="doc.BankCardNumber">
    </nz-input-group>
    <nz-input-group *ngIf="sktype=='wechat'" nzAddOnBefore="微信账户">
      <nz-select style="width:100%;" [(ngModel)]="skopenid" (ngModelChange)="skchange()">
        <nz-option  *ngFor="let item of sk" [nzValue]="item.value" [nzLabel]="item.key"></nz-option>
      </nz-select>
    </nz-input-group>
  </div>
</nz-modal>
<nz-modal [(nzVisible)]="isEditVisible" nzTitle="编辑信息" (nzOnCancel)="edithandleCancel()" (nzOnOk)="handleEditOk()"
  nzWrapClassName="vertical-center-modal" [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
    <nz-input-group disabled="true" nzAddOnBefore="名称">
      <input type="text" nz-input [(ngModel)]="doc.name">
    </nz-input-group>
    <!-- <nz-input-group  nzAddOnBefore="佣金比例">
    <input type="text" nz-input [(ngModel)]="doc.rate">
  </nz-input-group> -->
    <!-- <nz-input-group disabled="true" nzAddOnBefore="位置">
      <input type="text" nz-input [(ngModel)]="doc.ad_info">
    </nz-input-group> -->
    <!-- <nz-input-group disabled="true" nzAddOnBefore="银行卡号">
        <input type="text" nz-input [(ngModel)]="doc.BankCardNumber">
      </nz-input-group> -->
  </div>
</nz-modal>